#include <printf.h>

int main() {
    int circle[10] = {1, 0, 0, 0, 0, 0, 1, 0, 2, 1};
    int n;
    int count = 0;

    printf("Enter a number: ");
    scanf("%d", &n);

    while (n > 0) {
        count += circle[n % 10];
        n /= 10;
    }

    printf("%d\n", count);
    return 0;
}
